<?php
defined('BASEPATH') or exit('No direct script access allowed');
?>
<!DOCTYPE html>
<html lang="en">

<head>
	<!--加载header文件-->
	<?php
	include_once 'public/views/header.php';
	?>
	<?php
	include_once 'public/home/html/faltSelect.php';
	include_once 'public/home/html/laydate.php';
	include_once 'public/home/html/upload.php';
	include_once 'public/home/html/onoff.php'
	?>
	<link rel="stylesheet" href="public/css/edit.css" />
	<script src="cust/js/userEdit.js"></script>
	<script src="cust/js/goodsUpload.js"></script>
	<script src="public/js/cus_modal.js"></script>
	<style type="text/css">
		.file {
			position: relative;
			display: inline-block;
			background: #D0EEFF;
			border: 1px solid #99D3F5;
			border-radius: 4px;
			padding: 4px 12px;
			overflow: hidden;
			color: #1E88C7;
			text-decoration: none;
			text-indent: 0;
			line-height: 20px;
		}

		.file input {
			position: absolute;
			font-size: 100px;
			right: 0;
			top: 0;
			opacity: 0;
		}

		.file:hover {
			background: #AADFFD;
			border-color: #78C3F3;
			color: #004974;
			text-decoration: none;
		}

		.showFileName,
		.fileerrorTip {
			position: relative;
			top: -10px;
			left: 5px;
		}

		.fileerrorTip {
			color: red;
		}

		.showFileName {
			color: green;
		}

		.del-icon {
			color: red;
			position: relative;
			left: 15px;
			top: -13px;
		}
	</style>
</head>

<body>
	<div class="container">
		<div class="row">
			<input type="hidden" id="modal_title" value="<?= $title ?>" />
			<input type="hidden" id="modal_height" value="450" />
			<input type="hidden" id="now_type" value="paperFile" />
			<form id="editForm" enctype="multipart/form-data">
				<input type="hidden" id="type" name="type" value="<?= $type ?>" />
				<input type="hidden" id="id" name="id" value="<?= $id ?>" />
				<table class='edit_table'>
						<tr>
							<th class="required">姓名</th>
							<td>
								<input type="text" id="username_s" name="username"  value="<?= estr($detail, 'username') ?>" dataType="*" />
							</td>
							<th class="required">专业</th>
							<td>
								<input type="text" id="major_s" name="major"  value="<?= estr($detail, 'major') ?>" dataType="*" />
							</td>
						</tr>
						<tr>
							<th class="required">年级</th>
							<td>
								<input type="text" id="grade_s" name="grade"  value="<?= estr($detail, 'grade') ?>" dataType="*" />
							</td>
							<th class="required">班级</th>
							<td>
								<input type="text" id="class_s" name="class"  value="<?= estr($detail, 'class') ?>" dataType="*" />
							</td>
						</tr>
						<tr>
							<th class="required">学号</th>
							<td>
								<input type="text" id="usercode_s" name="usercode"  value="<?= estr($detail, 'usercode') ?>" dataType="*" />
							</td>
							<th class="required">手机号</th>
							<td>
								<input type="text" id="phone_s" name="phone"  value="<?= estr($detail, 'phone') ?>" dataType="*" />
							</td>
						</tr>
						<tr>
							<th class="required">所属单位</th>
							<td>
								<select style="width:157px" id="dept_name_s" dataType="*" data-val="<?= estr($detail, 'dept_name') ?>" name="dept_name">
									<option value="-1">请选择</option>
									<?php foreach ($dept as $k => $v) : ?>
										<option value="<?php echo $v; ?>" <?php if ($v == $detail['dept_name']) echo 'selected="selected"'; ?>><?php echo $v; ?></option>
									<?php endforeach; ?>
								</select>
							</td>
							<th class="required">性别</th>
							<td>
								<select style="width:157px" id="sex_s" name="sex" data-val="<?= estr($detail, 'sex') ?>">
									<option value="-1">请选择</option>
									<?php foreach ($sex_arr as $k => $v) : ?>
										<option value="<?php echo $v['Caption']; ?>" <?php if ($v['Caption'] == $detail['sex']) echo 'selected="selected"'; ?>><?php echo $v['Caption']; ?></option>
									<?php endforeach; ?>
								</select>
							</td>
						</tr>
						<tr>
							<th class="required">出生年月</th>
							<td>
								<input type="text" id="birthday_t" name="birthday"  value="<?= estr($detail, 'birthday') ?>" />
							</td>
							<th class="required">研究方向</th>
							<td>
								<input type="text" id="research_direction_s" name="research_direction" value="<?= estr($detail, 'research_direction') ?>" />
							</td>
						</tr>

					</table>
			</form>
		</div>
	
		
	</div>
</body>

<script type="text/javascript">

	$(".sumbit").on("click", function() {
		console.log($("form").serialize())
	})
	
</script>

</html>